import { combineReducers, createStore, legacy_createStore, applyMiddleware } from 'redux'


import thunk from 'redux-thunk'

import todo from './reducers/todo'

import list from './reducers/list'

import logger from 'redux-logger'
import { composeWithDevTools } from 'redux-devtools-extension'

// import { applyMiddleware } from 'redux'


const rootStore = combineReducers({
    todo,
    list

})


//  logger  中间件只能放到最后面
const store = createStore(rootStore, composeWithDevTools(applyMiddleware(thunk, logger)))


export default store